
//  token=e526f20c-f25d-4248-ab66-f3b41408e069|admin|1|2|3|4|5|6
var token=document.cookie.split(';')[0]
var quan=token.split("|");
adminId=quan[1]
$("#adminname").text(quan[2])
new Vue({
    el:"#daohang",
    methods:{
        isShow(v){
            for (var i=3;i<quan.length;i++){
                if (v==quan[i])return true
            }
            return false
        }
    },
    mounted(){
        axios.post('/login/getAdmin1').then(res=>{
            console.log(res.data)
        }).catch(res=>{
            // alert("xxx")
            location.href="/error.html"
        })
    }
})
$("#tuichu").click(
    function deleteCookie(name){
        $.get("/login/del",success,'json');
        window.location.href = "/index.html";
    }
)
function getCookie() {
    var ca = document.cookie.split(';')[0];
    var bb=quan[2]
    return bb;
}
function  success(data) {
    if(data){
        alert("退出成功！")
    }else{
        alert("退出失败！")
    }
}